﻿using Avalon.Data;

namespace Avalon.Repository
{
    public static class ContextFactory
    {
        private static AvalonDbContext _context;

        public static AvalonDbContext Current
        {
            get
            {
                if (_context == null) _context = new AvalonDbContext();
                return _context;
            }
            set
            {
                _context = value;
            }
        }


        public static void Reset()
        {
            _context = null;
        }
    }
}
